/**
 * create by wangkang12 on 2021/1/14
 * description： 路由管理
 */
import React from "react";
import {
  HashRouter,
  Redirect,
  Route,
  RouteComponentProps,
  Switch,
  withRouter,
} from "react-router-dom";
import App from "@components/App/App";

function Routes() {
  return (
    <React.Suspense fallback={<div />}>
      <Switch>
        <Route path="/index" component={App} />
        <Route path="/other" component={App} />
        <Redirect from={"/*"} to={"/index"} />
      </Switch>
    </React.Suspense>
  );
}

function Index() {
  return (
    <>
      <HashRouter>
        <Routes />
      </HashRouter>
    </>
  );
}
export default React.memo(Index);
